/**
 * Department.js
 *
 * @description :: TODO: You might write a short summary of how this model works and what it represents here.
 * @docs        :: http://sailsjs.org/#!documentation/models
 */

module.exports = {

	//connection : 'weixinServer',
		
	autoPK : false,
	
	autoCreatedAt: false,
	
	autoUpdatedAt: false,

	attributes : {
		
		id : {
			type : 'integer',
			primaryKey : true
		},
		
		name : {
			type : 'string',
			required : true
		},
		
		parentid : {
			type : 'integer',
			required : true
		},
		
		order : {
			type : 'integer',
		},
		
		userlist : {
			collection : 'User',
			via : 'deptlist'
		}
		
	}
};
